import request from '@/utils/request'
import { downFile } from '@/utils/request'

export function getDeviceList(query) {
  return request({
    url: '/mes/md/device/list',
    method: 'get',
    params: query,
  })
}

export function insertDevice(data) {
  return request({
    url: '/mes/md/device/addDevice',
    method: 'post',
    data: data,
    contextType:"application/json"
  })
}


export function updateDevice(data) {
  return request({
    url: '/mes/md/device/updateDevice',
    method: 'post',
    data: data,
    contextType:"application/json"
  })
}


export function delDevice(data) {
  return request({
    url: '/mes/md/device/delDevice',
    method: 'post',
    data: data,
    contextType:"application/json"
  })
}


export function getworkstationList(query) {
  return request({
    url: '/mes/md/device/getworkstationList',
    method: 'get',
    params: query,
  })
}
